package thread.test4Queue.domain;

/**
 * Created by majian8 on 2019/6/9.
 */
public class Person implements Comparable{
    private int age;
    private String name;

    @Override
    public int compareTo(Object o) {
        return this.age-((Person)o).getAge();
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

}
